<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>{$productTitle}-出行日期</title>
  <link rel="stylesheet" href="__PUBLIC__/css/style.css">
  <!-- <link rel="stylesheet" href="__PUBLIC__/css/font.css" /> -->
  <script type="text/javascript" src="__PUBLIC__/js/jquery.min.js"></script>
  <!-- // <script type="text/javascript" src="__PUBLIC__/js/common.js"></script> -->
  <script type="text/javascript" src="/Public/js/jquery.form.min.js"></script>
  <script type="text/javascript" src="__PUBLIC__/plugin/layer/layer.js"></script>
  <script language="javascript" type="text/javascript" src="__PUBLIC__/js/My97DatePicker/WdatePicker.js"></script>
</head>
<body style="min-width: 100%;">

<script type="text/javascript">
$(function(){
	$("#form_do").submit(function()
	{
		var flightdate = $("select[name='flight_date']");
		if($.trim(flightdate.val())==''){
			flightdate.parent().find("span").remove().end().append("<span class='error'>选择航班不能为空</span>");
			return false;
		}else {
			flightdate.parent().find("span").remove().end();
		}

		var title = $("input[name='title']");
		if($.trim(title.val())==''){
			title.parent().find("span").remove().end().append("<span class='error'>航班标题不能为空</span>");
			return false;
		}else {
			title.parent().find("span").remove().end();
		}
		var supplierid = $("select[name='supplierid']");
		  if($.trim(supplierid.val())==''){
			  supplierid.parent().find("span").remove().end().append("<span class='error'>请选择供应商</span>");
			  return false;
		  }else {
			  supplierid.parent().find("span").remove().end();
		  }

	});


  $('#button-submit').click(function () {
    $('#form').ajaxSubmit({
      dataType:  'json',
      success:function (data) {
        if(data.valid == true)
        {
          layer.msg(data.state);
          window.parent.document.location.reload();
        }
        else
        {
          layer.msg(data.state);
        }
      }
    })
  })

});
</script>
<div class="form">
<form method='post' id="form" action="{:U(MODULE_NAME. '/Webproduct/airplaneInfoPost',array('id'=>$id,'productID'=>$productID,'airlineID'=>$airlineID))}">
      <dl>
        <dt style="width: 200px;"> 航班标题：</dt>
        <dd>
          <input type="text" name="title" class="inp_default"  value="{$airlineInfo.title}" />例：第1天 或 第6天
        </dd>
      </dl>

      <dl>
        <dt style="width: 200px;"> 航程类型：</dt>
        <dd>
          <select name="type" >
            <option value="0" <if condition="$airlineInfo['type'] eq '0'">selected</if>>去程</option>
            <option value="1" <if condition="$airlineInfo['type'] eq '1'">selected</if>>转机</option>
            <option value="2" <if condition="$airlineInfo['type'] eq '2'">selected</if>>回程</option>
          </select>
        </dd>
      </dl>
     <dl>
         <dt style="width: 200px;">供应商：</dt>
         <dd>
         <select name="supplierID">
           <option value="0">--请选择--</option>
           <volist name="supplier" id="supplier">
           <option value="{$supplier.id}" <if condition="$airlineInfo['supplierID'] eq $supplier['id']">selected</if> >{$supplier.name}</option>
           </volist>
         </select>
         </dd>
      </dl>
      <dl>
        <dt style="width: 200px;"> 出发地/出发机场：</dt>
        <dd>
          <input type="text" name="departurePlace" class="inp_small" value="{$airlineInfo.departurePlace}"/>
          /
          <input type="text" name="departureAirport" class="inp_default" value="{$airlineInfo.departureAirport}" />例：广州 / 广州白云国际机场
        </dd>
      </dl>
      <dl>
        <dt style="width: 200px;"> 北京时间/当地时间：</dt>
        <dd>
          <input type="text" class="inp_small" name="departureTime" value="{$airlineInfo.departureTime|date = 'H:i',###}" onClick="WdatePicker({dateFmt:'HH:mm'})"  readonly="readonly">
          /
          <input type="text" class="inp_small" name="departureLocalTime" value="{$airlineInfo.departureLocalTime|date = 'H:i',###}" onClick="WdatePicker({dateFmt:'HH:mm'})"  readonly="readonly">例：15:30 / 16:30
        </dd>
      </dl>
      <dl>
        <dt style="width: 200px;"> 目的地/到达机场：</dt>
        <dd>
          <input type="text" name="destinationPlace" class="inp_small" value="{$airlineInfo.destinationPlace}"/>
          /
          <input type="text" name="destinationAirport" class="inp_default" value="{$airlineInfo.departureAirport}" />例：苏黎世 / 苏黎世国际机场
        </dd>
      </dl>
      <dl>
        <dt style="width: 200px;"> 北京时间/当地时间：</dt>
        <dd>
          <input type="text" class="inp_small" name="destinationTime" value="{$airlineInfo.destinationTime|date = 'H:i',###}" onClick="WdatePicker({dateFmt:'HH:mm'})"  readonly="readonly">
          /
          <input type="text" class="inp_small" name="destinationLocalTime"  value="{$airlineInfo.destinationLocalTime|date = 'H:i',###}" onClick="WdatePicker({dateFmt:'HH:mm'})"  readonly="readonly">格式：22:45 / 23:45
        </dd>
      </dl>
      <dl>
        <dt style="width: 200px;"> 航班信息/班次/飞机型号：</dt>
        <dd>
          <input type="text" name="flightName" class="inp_small" value="{$airlineInfo.flightName}" />
          /
          <input type="text" name="flightNumber" class="inp_small" value="{$airlineInfo.flightNumber}" />
          /
          <input type="text" name="airplaneModel" class="inp_small" value="{$airlineInfo.airplaneModel}" />例：中国南方航空 / CZ3005 / 波音738
        </dd>
      </dl>
      <dl>
        <dt style="width: 200px;"> 座位数：</dt>
        <dd>
          <input type="text" name="seat" class="inp_small" value="<if condition="$airlineInfo['seat']">{$airlineInfo.seat}<else />100</if>"/>
        </dd>
      </dl>
      <dl>
        <dt style="width: 200px;"> 排序：</dt>
        <dd>
          <input type="text" name="sort" class="inp_small" value="<if condition="$airlineInfo['sort']">{$airlineInfo.sort}<else />255</if>"/>
        </dd>
      </dl>
      <dl>
        <dt style="width: 200px;"></dt>
        <dd>
          <input type="button" class="button-green" id="button-submit" value="保 存">
        </dd>
      </dl>
  </form>
</div>
</body>
</html>